<!-- 页面右侧通用主体内容区域组件 -->
<script setup>
defineProps({
    title:{
        required:true,
        type:String
    }
})
</script>
<template>
    <el-card class="page-container">
      <!-- element-plus中-card卡片组件 头部配置 -->
      <template #header>
        <div class="card-header">
          <!-- 头部标题 props 传递过来的值-->
          <span>{{ title }}</span>

          <!-- 内容区域配置 -->
          <div class="extra">
            <!-- 插槽 -->
            <slot name="extra"></slot>
          </div>
        </div>
      </template>
      <!-- 底部默认插槽 -->
      <slot></slot>
    </el-card>
  </template>
  
  <style lang="scss" scoped>
  .page-container {
    min-height: 100%;
    box-sizing: border-box;
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
  </style>